﻿Namespace EIB.Exceptions
    Public Class EIBException
        Inherits Exception

        Sub New(message As String)
            MyBase.New(message)
        End Sub

        Sub New(message As String, innerException As Exception)
            MyBase.New(message, innerException)
        End Sub
    End Class


    Public Class EIBBusDataParseException
        Inherits EIBException

        Sub New(message As String)
            MyBase.New(message)
        End Sub

        Sub New(message As String, innerException As Exception)
            MyBase.New(message, innerException)
        End Sub
    End Class


    Public Class EIBBusDataChecksumException
        Inherits EIBException

        Sub New()
            MyBase.New("Checksum verification did not match.")
        End Sub

        Sub New(message As String)
            MyBase.New(message)
        End Sub

        Sub New(message As String, innerException As Exception)
            MyBase.New(message, innerException)
        End Sub
    End Class


    Public Class EIBDataEncodeException
        Inherits EIBException

        Sub New(message As String)
            MyBase.New(message)
        End Sub

        Sub New(message As String, innerException As Exception)
            MyBase.New(message, innerException)
        End Sub
    End Class


    Public Class EIBDataDecodeException
        Inherits EIBException

        Sub New(message As String)
            MyBase.New(message)
        End Sub

        Sub New(message As String, innerException As Exception)
            MyBase.New(message, innerException)
        End Sub
    End Class


    Public Class EIBAddressParseException
        Inherits EIBException

        Sub New(message As String)
            MyBase.New(message)
        End Sub

        Sub New(message As String, innerException As Exception)
            MyBase.New(message, innerException)
        End Sub
    End Class
End Namespace